package view;

import java.util.Observer;
import java.util.Observable;

import javax.swing.JButton;

public class CustomButton extends JButton implements Observer {

	private static final long serialVersionUID = 1L;

	public CustomButton(Observable obs, String txt) {
		obs.addObserver(this);

		setEnabled(false);
		setText(txt);
	}

	public void update(Observable obs, Object obj) {
		Boolean bool = (Boolean) obj;
		setEnabled(bool);
	}
}
